<ion-modal-view class="contacts">
    <ion-header-bar>
        <div class="buttons left-buttons">
            <button class="button button-icon ion-ios-arrow-back" ng-click="cancel()"></button>
        </div>
        <h2 class="title">{{data.pickSource ? '企业联系人' : '手机通讯录'}}</h2>
        <div class="buttons right-buttons">
            <button class="button button-clear" ng-click="submit()">确定</button>
        </div>
    </ion-header-bar>
    <ion-header-bar class="bar-subheader">
        <search-bar class="search" placeholder="姓名 手机号" search="data.search"></search-bar>
    </ion-header-bar>
    <ion-content scroll="false">
        <h4 class="contact-title" ng-if="data.search || data.location">{{data.tips}}</h4>
        <div class="contact-scroll" ng-class="{'contact-top-dist':data.search || data.location}">
            <ion-scroll scrollbar-y="false" has-bouncing="true">
                <ion-checkbox collection-repeat="item in data.contacts" class="item-checkbox-right chat-box" ng-disabled="!item.phone" ng-model="item.checked">
                    <img ng-src="{{item.photo || 'img/default-avatar.png'}}">
                    {{item.name}}
                    <span ng-if="data.pickSource" class="department">{{item.department}}</span>
                    <span ng-if="!item.phone" class="phone-null">手机号为空</span>
                </ion-checkbox>
            </ion-scroll>
        </div>
        <char-bar on-char="setChar(char)"></char-bar>
    </ion-content>
</ion-modal-view>